import 'package:flutter/material.dart';

class MessagePage extends StatefulWidget {
  const MessagePage({super.key});

  @override
  State<MessagePage> createState() => _MessagePageState();
}

class _MessagePageState extends State<MessagePage> {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          ElevatedButton(
            onPressed: () {
              Navigator.pushNamed(context, '/key');
            },
            child: Text('LocalKey讲解'),
          ),
          Divider(),
          ElevatedButton(
            onPressed: () {
              Navigator.pushNamed(context, '/globalKey');
            },
            child: Text('GlobalKey讲解'),
          ),
          Divider(),
          ElevatedButton(
            onPressed: () {
              Navigator.pushNamed(context, '/currentState');
            },
            child: Text('GlobalKey获取子组件'),
          ),
          Divider(),
          ElevatedButton(
            onPressed: () {
              Navigator.pushNamed(context, '/animatedList');
            },
            child: Text('AnimatedList 组件'),
          ),
          Divider(),
          ElevatedButton(
            onPressed: () {
              Navigator.pushNamed(context, '/animatedList');
            },
            child: Text('AnimatedContainer 隐式动画'),
          ),
        ],
      ),
    );
  }
}
